#sbin_PROGRAMS = lightdm
#bin_PROGRAMS = dm-tool

set(lightdm_SOURCES
        accounts.c
        accounts.h
        console-kit.c
        console-kit.h
        display-manager.c
        display-manager.h
        display-manager-service.c
        display-manager-service.h
        display-server.c
        display-server.h
        greeter.c
        greeter.h
        greeter-session.c
        greeter-session.h
        greeter-socket.c
        greeter-socket.h
        guest-account.c
        guest-account.h
        lightdm.c
        logger.c
        logger.h
        login1.c
        login1.h
        log-file.c
        log-file.h
        plymouth.c
        plymouth.h
        process.c
        process.h
        seat.c
        seat.h
        seat-local.c
        seat-local.h
        seat-xdmcp-session.c
        seat-xdmcp-session.h
        seat-xremote.c
        seat-xremote.h
        seat-xvnc.c
        seat-xvnc.h
        session.c
        session.h
        session-child.c
        session-child.h
        session-config.c
        session-config.h
        shared-data-manager.c
        shared-data-manager.h
        vnc-server.c
        vnc-server.h
        vt.c
        vt.h
        wayland-session.c
        wayland-session.h
        x-authority.c
        x-authority.h
        x-server-local.c
        x-server-local.h
        x-server-remote.c
        x-server-remote.h
        x-server-xvnc.c
        x-server-xvnc.h
        x-server.c
        x-server.h
        xdmcp-protocol.c
        xdmcp-protocol.h
        xdmcp-server.c
        xdmcp-server.h
        xdmcp-session.c
	xdmcp-session.h
    )

add_executable(${PROJECT_NAME}
        ${lightdm_SOURCES}
)

set(defines )
target_compile_definitions(${PROJECT_NAME}
        PRIVATE
        SBIN_DIR="${CMAKE_INSTALL_SBINDIR}"
        USERS_DIR="${CMAKE_INSTALL_LOCALEDIR}/lib/lightdm-data"
        LOG_DIR="${CMAKE_INSTALL_LOCALSTATEDIR}/log/lightdm"
        RUN_DIR="${CMAKE_INSTALL_LOCALSTATEDIR}/run/lightdm"
        CACHE_DIR="${CMAKE_INSTALL_LOCALSTATEDIR}/cache/lightdm"
)

target_link_libraries(${PROJECT_NAME}
        PRIVATE
        macros-interface
        common
        liblightdm-gobject-1
)

#lightdm_CFLAGS = \
#	$(WARN_CFLAGS) \
#	$(LIGHTDM_CFLAGS) \
#	-I"$(top_srcdir)/common" \
#
#lightdm_LDADD = \
#	$(LIGHTDM_LIBS) \
#	$(top_builddir)/common/libcommon.la \
#	-lgcrypt \
#	-lpam
#
#dm_tool_SOURCES = \
#	dm-tool.c
#
#dm_tool_CFLAGS = \
#	$(WARN_CFLAGS) \
#	$(LIGHTDM_CFLAGS) \
#	-DLOCALE_DIR=\"$(datadir)/locale\"
#
#dm_tool_LDADD = \
#	$(LIGHTDM_LIBS)
#
#libexec_PROGRAMS = lightdm-guest-session
#
#lightdm_guest_session_SOURCES = lightdm-guest-session.c
#
#lightdm_guest_session_CFLAGS = \
#	$(WARN_CFLAGS) \
#	$(LIGHTDM_CFLAGS)
#
#EXTRA_DIST = \
#	display-manager.xml
